﻿<Selection:jSLGrid x:Class="jSLApp.Client.Controls.ArticleGrid"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Selection="clr-namespace:jSLCore.Client.Presentation.BaseControl.Selection;assembly=jSLCore.Client.Presentation" xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" xmlns:jBinding="clr-namespace:jSLCore.Client.Presentation.jBinding;assembly=jSLCore.Client.Presentation" xmlns:j="clr-namespace:jSLCore.Client.Presentation.Controls;assembly=jSLCore.Client.Presentation" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" IsReadOnly="True" HeadersVisibility="None">
    <Selection:jSLGrid.Resources>
        <ResourceDictionary Source="../Resources/UndergroundStyle.xaml"/>
    </Selection:jSLGrid.Resources>
    <Selection:jSLGrid.Columns>
        <Controls:DataGridTemplateColumn Width="*">
            <Controls:DataGridTemplateColumn.CellTemplate>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Image Width="56" Height="56" Stretch="Fill" Grid.Column="0" VerticalAlignment="Top">
                            <Image.Source>
                                <jBinding:jBinding Path="ImageBs" ConvertingMode="BinaryToImage"/>
                            </Image.Source>
                        </Image>
                        <StackPanel Orientation="Vertical" Grid.Column="1">
                            <HyperlinkButton FontWeight="Bold" FontSize="14" Content="{Binding Header}" Click="goto_Article"/>
                            <TextBlock TextWrapping="Wrap" Text="{Binding Brief}"/>
                            <StackPanel Orientation="Horizontal">
                                <j:LeftHeaderContainer Header="Автор:" ShareGroupName="1">
                                    <TextBlock Text="{Binding CreatorNameText}"/>
                                </j:LeftHeaderContainer>
                                <j:LeftHeaderContainer Header="Дата публикации:" ShareGroupName="2">
                                    <TextBlock>
                                    	<TextBlock.Text>
                                    		<jBinding:jBinding Path="CreationDate" ConvertingMode="ToShortDate" />
                                    	</TextBlock.Text>
                                    </TextBlock>
                                </j:LeftHeaderContainer>
                                <j:LeftHeaderContainer Header="Тип:" ShareGroupName="3">
                                    <TextBlock>
                                        <TextBlock.Text>
                                            <jBinding:EnumBinding Path="TypeEnum"/>
                                        </TextBlock.Text>
                                    </TextBlock>
                                </j:LeftHeaderContainer>
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                </DataTemplate>
            </Controls:DataGridTemplateColumn.CellTemplate>
        </Controls:DataGridTemplateColumn>
    </Selection:jSLGrid.Columns>
</Selection:jSLGrid>
